<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<link href="https://cdn.bootcss.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet">
    <!-- <link rel="stylesheet" href="./css/bootstrap-theme.min.css"> -->
    <link rel="stylesheet" href="./cad-viewer/css/main.css" type="text/css">
    <!-- <link rel="stylesheet" href="./css/font-awesome.css" > -->

    <!-- <script src="./js/jquery.min.js"></script> -->
    <script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>
    <!-- <script src="./js/moment.min.js"></script> -->
    <!-- <script src="./js/bootstrap.min.js"></script> -->
    <script src="https://cdn.bootcss.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>

    <!-- The Viewer CSS -->
    <link rel="stylesheet" href="https://developer.api.autodesk.com/modelderivative/v2/viewers/style.min.css?v=v3.3.*" type="text/css">

    <!-- Viewer production -->
    <script src="https://developer.api.autodesk.com/modelderivative/v2/viewers/three.min.js?v=v3.3.*"></script>
    <script src="https://developer.api.autodesk.com/modelderivative/v2/viewers/6.0/viewer3D.min.js"></script>
    
    <!-- The Viewer Extensions -->
    <script src="./cad-viewer/extensions/Viewing.Extension.Markup3D.min.js"></script>
    <script src="./cad-viewer/extensions/Viewing.Extension.Transform.min.js"></script>
    <script src="./cad-viewer/extensions/Viewing.Extension.ControlSelector.min.js"></script>
        <!-- The Viewer JS -->
    <script type="text/javascript" src="./cad-viewer/js/oauth.js" ></script>
    <script type="text/javascript">
            urlinfo=window.location.href;  //获取当前页面的url
            len=urlinfo.length;//获取url的长度
            offset=urlinfo.indexOf("?");//设置参数字符串开始的位置
            newsidinfo=urlinfo.substr(offset,len)//取出参数字符串 这里会获得类似“id=1”这样的字符串
            newsids=newsidinfo.split("=");//对获得的参数字符串按照“=”进行分割
            newsid=newsids[1];//得到参数值
            alert("您要传递的参数值是"+newsid);
	//cad urn地址
    var documentId = 'urn:'+newsid;

    </script>
    <script type="text/javascript" src="./cad-viewer/js/index.js" ></script>
</head>

<body style="background-color: white;">
	<!--NavBar-->
    <nav class="navbar navbar-inverse navbar-fixed-top" id="my-navbar">
        <div class="container">
            <div class="collapse navbar-collapse" id="navbar-collapse">
                <ul class="nav navbar-nav">
                    <li><a href="https://github.com/jaimerosales/modelderivative-nodejs-tutorial">Model Uploader</a></li>
                    <li><a href="https://developer.autodesk.com">Forge Developer Docs</a></li>
                    <li style="margin-top:15px;"><a href="https://twitter.com/afrojme" class="twitter-follow-button" data-show-count="false">Follow @afrojme</a><script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script></li>
                </ul>
                <ul class="nav navbar-nav navbar-right">
                     <li><a href="https://github.com/Autodesk-Forge/viewer-nodejs-tutorial">View on GitHub </a></li>
                </ul>
            </div>
        </div><!--End Container-->
    </nav><!--End Navbar-->

    <div class="container">
        <!-- This is where your viewer should attach -->
        <div class="center-block" id="viewerDiv"></div>
        
        <!-- Extension Buttons -->
      <!--  <div class="row">
            
            <div class="myButton" id="background" onclick="changeBackground()">Change Background</div>
            <div class="myButton" id="background" onclick="resetBackground()">Reset Background</div>
            <div class="myButton" id="background" onclick="loadMarkup3D()">Markup3D</div>
            <div class="myButton" id="background" onclick="loadTransform()">Transform</div>
            <div class="myButton" id="background" onclick="loadControlSelector()">Control Selector</div>
        </div> -->
        <!---->
    </div><!-- /container -->
</body>
</html>